home *** CD-ROM | disk | FTP | other *** search
/ Envy Press Kit / Envy Press Kit.iso / mac / Movie.dxr / scripts_3_fixPath.ls < prev    next >
Encoding:
Text File  |  2004-03-03  |  465 b   |  21 lines

  1. on fixPath filePath
  2.   if (the environment).platform contains "Macintosh" then
  3.     delim = ":"
  4.   else
  5.     delim = "\"
  6.   end if
  7.   n = length(filePath)
  8.   fixedPath = EMPTY
  9.   repeat with i = 1 to n
  10.     currChar = char i of filePath
  11.     if (currChar = ":") or (currChar = "\") then
  12.       currChar = delim
  13.     end if
  14.     fixedPath = fixedPath & currChar
  15.   end repeat
  16.   if char n of filePath <> delim then
  17.     fixedPath = fixedPath & delim
  18.   end if
  19.   return fixedPath
  20. end
  21.